<template>
  <router-view v-slot="{ Component }">
    <transition>
      <component :is="Component" />
    </transition>
  </router-view>
</template>

<script>

import { useRouter } from 'vue-router'

export default {
  name: 'App',
  setup () {
    const router = useRouter()
    return {
      router
    }
  },
  created () {
    // const token = localStorage.getItem('t')
    // if (token !== undefined && token !== null && token !== '') {
    //   this.router.push('/index')
    // }
  }
}
</script>

<style>
.component-fade-enter-active, .component-fade-leave-active {
  transition: opacity .3s ease;
}
.component-fade-enter, .component-fade-leave-to {
  opacity: 0;
}
</style>
